package bist.believeinstep.mapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import bist.believeinstep.domain.SubMenu;

public class SubmenuMapper implements RowMapper<SubMenu>{
	public SubMenu mapRow(ResultSet rs, int rowNum) throws SQLException{
		
		SubMenu subMenu = new SubMenu();
		
		subMenu.setId(rs.getInt("id"));
		subMenu.setName(rs.getString("name"));
		subMenu.setMenuId(rs.getInt("bist_menus_id"));
		subMenu.setCreated(rs.getTimestamp("created_date"));
		subMenu.setModified(rs.getTimestamp("modified_date"));
		subMenu.setCreatedBy(rs.getString("created_by"));
		subMenu.setModifiedBy(rs.getString("modified_by"));
		
		return subMenu;
	}
}
